

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit Aluno</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">Aluno List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Aluno</g:link></span>
        </div>
        <div class="body">
            <h1>Edit Aluno</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${alunoInstance}">
            <div class="errors">
                <g:renderErrors bean="${alunoInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${alunoInstance?.id}" />
                <input type="hidden" name="version" value="${alunoInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="usuario">Usuario:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'usuario','errors')}">
                                    <g:select optionKey="id" from="${Usuario.list()}" name="usuario.id" value="${alunoInstance?.usuario?.id}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="estado">Estado:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'estado','errors')}">
                                    <g:select id="estado" name="estado" from="${alunoInstance.constraints.estado.inList}" value="${alunoInstance.estado}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cre">Cre:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'cre','errors')}">
                                    <input type="text" id="cre" name="cre" value="${fieldValue(bean:alunoInstance,field:'cre')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="areasDeInteresse">Areas De Interesse:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'areasDeInteresse','errors')}">
                                    <g:select name="areasDeInteresse"
from="${AreaDeInteresse.list()}"
size="5" multiple="yes" optionKey="id"
value="${alunoInstance?.areasDeInteresse}" />

                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="bairro">Bairro:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'bairro','errors')}">
                                    <input type="text" id="bairro" name="bairro" value="${fieldValue(bean:alunoInstance,field:'bairro')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cep">Cep:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'cep','errors')}">
                                    <input type="text" id="cep" name="cep" value="${fieldValue(bean:alunoInstance,field:'cep')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cidade">Cidade:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'cidade','errors')}">
                                    <input type="text" id="cidade" name="cidade" value="${fieldValue(bean:alunoInstance,field:'cidade')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="deficiencia">Deficiencia:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'deficiencia','errors')}">
                                    <g:checkBox name="deficiencia" value="${alunoInstance?.deficiencia}" ></g:checkBox>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="descricaoDeficiencia">Descricao Deficiencia:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'descricaoDeficiencia','errors')}">
                                    <input type="text" id="descricaoDeficiencia" name="descricaoDeficiencia" value="${fieldValue(bean:alunoInstance,field:'descricaoDeficiencia')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="endereco">Endereco:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'endereco','errors')}">
                                    <input type="text" id="endereco" name="endereco" value="${fieldValue(bean:alunoInstance,field:'endereco')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="matricula">Matricula:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'matricula','errors')}">
                                    <input type="text" id="matricula" name="matricula" value="${fieldValue(bean:alunoInstance,field:'matricula')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nome">Nome:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'nome','errors')}">
                                    <input type="text" id="nome" name="nome" value="${fieldValue(bean:alunoInstance,field:'nome')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="periodos">Periodos:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:alunoInstance,field:'periodos','errors')}">
                                    <g:select name="periodos"
from="${Periodo.list()}"
size="5" multiple="yes" optionKey="id"
value="${alunoInstance?.periodos}" />

                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
